package com.my.study.utils;

import cn.hutool.core.util.RandomUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @author Carlos
 * @version 1.0.0
 * @date 2023/1/7 20:51
 */
public class RandomLottery {

    private static final int TEN = 10;
    private static final int NUM = 13;
    private static final Random RANDOM = RandomUtil.getRandom(true);
    
    public static void main(String[] args) {
        List<Result> results = createTenResult();
        for (Result result : results) {
            System.out.println(result);
        }
    }
    
    
    private static List<Result> createTenResult() {
        List<Result> results = new ArrayList<>();
        for (int i = 0; i < TEN; i++) {
            results.add(new Result(getPlayNo(), getPlayNo()));
        }
        return results;
    }
    
    private static int getPlayNo() {
        return RANDOM.nextInt(NUM) + 1;
    }
    
    static class Result {
        private int one;
        private int two;

        public Result() {
        }

        public Result(int one, int two) {
            this.one = one;
            this.two = two;
        }

        public int getOne() {
            return one;
        }

        public void setOne(int one) {
            this.one = one;
        }

        public int getTwo() {
            return two;
        }

        public void setTwo(int two) {
            this.two = two;
        }

        @Override
        public String toString() {
            return "[" + one + "], [" + two + "]";
        }
    }
    
}
